<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="com.blockchain.front.servlets.financial.Charge"%>
<%@page import="java.util.Random"%>
<%@page import="java.text.DecimalFormat"%>
<%@page import="com.blockchain.common.enums.ChargeStatus"%>
<%@page import="com.blockchain.common.enums.ChargeType"%>
<%@page import="com.blockchain.front.servlets.financial.CnyTx"%>
<%@page import="com.blockchain.front.service.financial.entity.TxRecordEntity"%>
<%@page import="com.blockchain.common.enums.WithdrawStatus"%>
<%@page import="com.blockchain.front.servlets.security.Bank"%>
<%@page import="com.blockchain.front.service.security.entity.BankCard"%>
<%@page import="com.blockchain.front.service.financial.entity.UserZhEntity"%>
<%@page import="com.blockchain.front.servlets.SendVice"%>
<%@page import="com.blockchain.front.servlets.Send"%>
<%@page import="com.blockchain.front.servlets.security.Qbbz"%>
<%@page import="com.blockchain.front.service.financial.entity.XlbEntity"%>
<%@page import="com.blockchain.util.http.URLParameter"%>
<%@page import="com.blockchain.front.servlets.financial.AbstractFinancialServlet"%>
<%@page import="com.blockchain.front.service.AbstractFrontService"%>
<%@page import="com.blockchain.front.servlets.AbstractFrontServlet"%>
<%@page import="com.blockchain.front.service.financial.entity.JlEntity"%>
<%@page import="com.blockchain.common.enums.JyztStatus"%>
<%@page import="com.blockchain.front.service.security.entity.QbdzEntity"%>
<%@page import="com.blockchain.front.service.security.SecurityManage"%>
<%@page import="com.blockchain.front.service.financial.FinancialManage"%>
<html>
<head>
<%String _TITLE_ = "人民币充值- "+configureProvider.getProperty(SystemVariable.SITE_NAME);
CURRENT_SUB_CATEGORY="WDZC";
PC_TITLE_NAME="RMBCZ";
URLParameter parameter = new URLParameter(request,controller.getViewURI(request,CnyCz.class));
SecurityManage securityManage = serviceSession.getService(SecurityManage.class);
ChargeStatus zt=EnumParser.parse(ChargeStatus.class, request.getParameter("zt"));
ChargeType type=EnumParser.parse(ChargeType.class,null);
FinancialManage manage=serviceSession.getService(FinancialManage.class);
final int currentPage = IntegerParser.parse(request.getParameter("paging.current"));
BankCard[] bs=securityManage.bankList();
 PagingResult<TxRecordEntity> searchCzjl=manage.searchCzjl(type,zt,new Paging() {
	public int getCurrentPage() {
		return currentPage;
	}

	public int getSize() {
		return 5;
	}
});
 TxRecordEntity[] search=searchCzjl.getItems(); //列表  
 BigDecimal min=BigDecimalParser.parse(configureProvider.getProperty(SystemVariable.CHARGE_MIN_AMOUNT));
%> 
<title><%=_TITLE_ %></title>
<%@include file="/WEB-INF/include/meta.jsp"%>
<%@include file="/WEB-INF/include/style.jsp"%>
<%@include file="/WEB-INF/include/authenticatedSession.jsp"%>
</head>
<%@include file="/WEB-INF/include/header.jsp"%>
<div class="autobox">
    <div class="now">
         <a href="<%=controller.getViewURI(request, com.blockchain.front.servlets.Index.class)%>" class="orange">首页</a> &gt; <a href="<%=controller.getViewURI(request,com.blockchain.front.servlets.financial.index.class)%>" class="orange">财务中心 </a> &gt; 人民币提现
    </div>
    <div class="assets_center clear po_re zin70">
        <!--左侧菜单-->
        <div class="coin_menu">
    <div class="coin_menu_box">
        <ul>
            <li id="finance_index"><i class="coin_menu_op_0_1"></i>人民币充值</li>
        </ul>
    </div>
     <%@include file="/WEB-INF/include/financial/left.jsp"%>	
</div>
         <form action="<%=controller.getURI(request, Charge.class)%>" method="post" id="form"   target="_blank"><!--右侧内容-->
        <div class="assets_content w900 right bg_w">
            <div class="safe_center clear" style="padding-left: 0px;">
                <h1 style="margin-top: 0px; margin-bottom: 15px; line-height: 15px;" href="#tab1">人民币充值</h1>
            </div>
              <div class="mytips">
                <h6 style="color: #ff8000;">温馨提示</h6>
                <p style="font-size:14px;">
                    <span style="color:#E53333;">
                    1、限额说明：每次最低充值<%=min%>元，最高限额按网银而定，如有需要，请咨询银行；<br />
                    2、若浏览器不支持网银支付，建议下载网银控件或者更换IE浏览器进行充值；<br />
                   <!--  3、若15分钟内未到账，请联系QQ客服：3093283991处理。<br /> -->
                    </span>
                </p>
            </div>
            <div class="choosepaymethod">
             	 <a href="<%=controller.getViewURI(request, Charge.class)%>" style="cursor:pointer;" class="wycz_cz active" id="online">网银充值(自动到账)</a>
                <a href="<%=controller.getViewURI(request, CnyCz.class)%>" style="cursor:pointer;" class="wycz_cz "  id="outline">转账充值(人工到账)</a>
                   <input type="hidden" name="type" value="HRPC">
                    <div class="choosebanks" style="display:block;" id="JKDiv_0" >
                        <div class="methodway clearfix" style="width:80%;margin:18px auto 0;">

                            <div class="w_div clearfix">
                                <div class="w1">充值金额：</div>
                                <div class="w2">
                                    <div id="dialog_content_CnyAddress">
                                        <span style="position: relative;" class="cc2">
                                        <input type="text" class="cztxinput" name="amount" id="mycz_amountipspay" value="" style="border-radius: 8px;">
                                       		<em style="color:#EA6647;"> 最低充值金额<%=Formater.formatAmount(min)%>元</em>
                                        </span>
                                    </div>
                                </div>

                            </div>
                            <div class="center">
                                <div style="text-align:left; padding:20px 0 20px 20px;">
                                    <dl>
                                        <dd class="pay_list_dd">
                                            <table width="100%" cellspacing="0" border="0" style="margin-bottom:30px;">
                                            <tbody>
                                                <tr>
                                                    <td style="padding-bottom:10px;">
                                                    <label>
                                                    <input type="radio" name="PaymentType" checked="checked" value="ICBC">&nbsp;&nbsp;&nbsp;<img width="121" height="33" src="<%=controller.getStaticPath(request)%>/images/icbc.gif"></label>
                                                    </td>
                                                    <td style="padding-bottom:10px;">
                                                    <label><input type="radio" name="PaymentType" value="ABC">&nbsp;&nbsp;&nbsp;<img width="121" height="33" src="<%=controller.getStaticPath(request)%>/images/abc.gif"></label>
                                                    </td>
                                                    <td style="padding-bottom:10px;">
                                                    <label><input type="radio" name="PaymentType" value="BOC">&nbsp;&nbsp;&nbsp;<img width="121" height="33" src="<%=controller.getStaticPath(request)%>/images/boc.gif"></label>
                                                    </td>
                                                    <td style="padding-bottom:10px;">
                                                    <label><input type="radio" name="PaymentType" value="CCB">&nbsp;&nbsp;&nbsp;<img width="121" height="33" src="<%=controller.getStaticPath(request)%>/images/ccb.gif"></label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td style="padding-bottom:10px;">
                                                    <label><input type="radio" name="PaymentType" value="CMB">&nbsp;&nbsp;&nbsp;<img width="121" height="33" src="<%=controller.getStaticPath(request)%>/images/cmb.gif"></label>
                                                    </td>
                                                    <td style="padding-bottom:10px;">
                                                    <label><input type="radio" name="PaymentType" value="PAB">&nbsp;&nbsp;&nbsp;<img width="121" height="33" src="<%=controller.getStaticPath(request)%>/images/pab.gif"></label>
                                                    </td>
                                                    <td style="padding-bottom:10px;">
                                                    <label><input type="radio" name="PaymentType" value="HXB">&nbsp;&nbsp;&nbsp;<img width="121" height="33" src="<%=controller.getStaticPath(request)%>/images/hxbc.gif"></label>
                                                    </td>
                                                    <td style="padding-bottom:10px;">
                                                    <label><input type="radio" name="PaymentType" value="GDB">&nbsp;&nbsp;&nbsp;<img width="121" height="33" src="<%=controller.getStaticPath(request)%>/images/gdb.gif"></label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td style="padding-bottom:10px;">
                                                    <label><input type="radio" name="PaymentType" value="CIB">&nbsp;&nbsp;&nbsp;<img width="121" height="33" src="<%=controller.getStaticPath(request)%>/images/cib.gif"></label>
                                                    </td>
                                                    <td style="padding-bottom:10px;">
                                                    <label><input type="radio" name="PaymentType" value="CEBB">&nbsp;&nbsp;&nbsp;<img width="121" height="33" src="<%=controller.getStaticPath(request)%>/images/ceb.gif"></label>
                                                    </td>
                                                    <td style="padding-bottom:10px;">
                                                    <label><input type="radio" name="PaymentType" value="CMBC">&nbsp;&nbsp;&nbsp;<img width="121" height="33" src="<%=controller.getStaticPath(request)%>/images/cmbc.gif"></label>
                                                    </td>
                                                    <td style="padding-bottom:10px;">
                                                    <label><input type="radio" name="PaymentType" value="SPDB">&nbsp;&nbsp;&nbsp;<img width="121" height="33" src="<%=controller.getStaticPath(request)%>/images/spdb.gif"></label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td style="padding-bottom:10px;">
                                                    <label><input type="radio" name="PaymentType" value="PSBC">&nbsp;&nbsp;&nbsp;<img width="121" height="33" src="<%=controller.getStaticPath(request)%>/images/psbc.gif"></label>
                                                    </td>
                                                    <td style="padding-bottom:10px;">
                                                    <label><input type="radio" name="PaymentType" value="CNCB">&nbsp;&nbsp;&nbsp;<img width="121" height="33" src="<%=controller.getStaticPath(request)%>/images/citic.gif"></label>
                                                    </td>
                                                    <td style="padding-bottom:10px;">
                                                    <label><input type="radio" name="PaymentType" value="BOB">&nbsp;&nbsp;&nbsp;<img width="121" height="33" src="<%=controller.getStaticPath(request)%>/images/bobj.gif"></label>
                                                    </td>
                                                    <td style="padding-bottom:10px;">
                                                    <label><input type="radio" name="PaymentType" value="BOS">&nbsp;&nbsp;&nbsp;<img width="121" height="33" src="<%=controller.getStaticPath(request)%>/images/bos.gif"></label>
                                                    </td>
                                                </tr>
                                            </tbody>
                                            </table>
                                        </dd>
                                    </dl>

                                </div>
                            </div>

                            <div class="w_div clearfix">
                                <div>
                                    <input type="button" class="btn-cztx" id="hrpay-submit" value="立即充值" title="立即充值" onclick="onSubmit();" style="border-radius: 8px;">
                                </div>
                            </div>
                        </div>
                    </div>
        </div>
                
                <div class="f_body">
                    <table class="f_table" id="investLog_content">
                        <thead>
                        <tr>
                        	<th width="">充值订单</th>
                            <th width="">充值时间</th>
                            <th width="">充值方式</th>
                            <th width="">充值金额</th>
                            <th width="">实际到账</th>
                            <th width="">
                            <select name="zt" id="status-selectTest">
                            <option  value="">状态</option>
                            <%for(ChargeStatus zs:ChargeStatus.values()){%>
                                <option <%if(zs.name().equals(String.valueOf(zt))){%> selected="selected"<%}%> value="<%=zs.name()%>"><%=zs.getName()%></option>
                             <%}%>
                            </select></th>
                        </tr>
                        </thead>
                        <tbody>
                  <%if(search!=null){for(TxRecordEntity s:search){%> 
            <tr>
            	<td><%=s.id%></td>
                <td><%=TimestampParser.format(s.sqsj)%></td>
                <td><%=s.chargeType.getName()%></td>
                <td><%=Formater.formatAmount(s.czje)%></td>
                <td><%=Formater.formatAmount(s.sjdzje)%></td>
                <td><%=s.chargeStatus.getName()%></td>
            </tr>
            <%}}%>
                  </tbody>
                    </table>
                   <%AbstractFinancialServlet.rendPaging(out, searchCzjl,controller.getPagingURI(request,Charge.class),parameter.getQueryString());%>
                </div>
                </div>
                </form>
            </div>
    </div>
    
<%@include file="/WEB-INF/include/footer.jsp"%>
<%@include file="/WEB-INF/include/script.jsp"%>
<script type="text/javascript">
var min=<%=min%>;
 $("#status-selectTest").change(function () {
	$("#form").attr("action",'<%=controller.getViewURI(request, Charge.class)%>');	
	$("#form").submit();
});
	
<%String error = controller.getPrompt(request,response,PromptLevel.ERROR);if(!StringHelper.isEmpty(error)){%>
	layer.open({
	title: '提示',
	content: '<%=languageDefine.getValue(request,error)%>'
});  
<%}%>
function onSubmit(){
	var mycz_amount = $("#mycz_amountipspay").val();
	if (mycz_amount == "" || mycz_amount == null) {
        layer.tips('请输入充值金额', '#mycz_amountipspay', {tips: 3});
        return false;
    }
    if(mycz_amount<min){
    	layer.tips('充值金额小于最小充值金额'+min+'', '#mycz_amountipspay', {tips: 3});
        return false;
    } 
    $("#form").submit();  
}

function ChangeDiv(divId,divName,zDivCount)
{
if (divId == 0){
   $('#online').attr('class', 'wycz_cz');
   $('#outline').attr('class', 'wycz_cz');
    $('#online').addClass( 'active');
}else{
    $('#online').attr('class', 'wycz_cz');
    $('#outline').attr('class', 'wycz_cz');
    $('#outline').addClass( 'active');
}

    for(i=0;i<=zDivCount;i++) {
        document.getElementById(divName+i).style.display="none";//将所有的层都隐藏

    }
    document.getElementById(divName+divId).style.display="block";//显示当前层
}

</script>
</body>
</html>	
	
